package com.design.pattern.command.after;

import com.design.pattern.command.before.Barbecue;

/**
 * 长沙先飞信息科技有限公司<br>
 * Created with IntelliJ IDEA.<br>
 * Date:2024/6/20<br>
 * Time:16:46<br>
 * 功能描述：<br>
 *
 * @author huang hou chun
 * @since JDK 1.8 <br>
 * Copyright (c) 2023 www.csxfrj.com System Incorporated All Rights Reserved.
 */
public class Client {

    public static void main(String[] args) {

        // 开店前准备
        Barbecue boy = new Barbecue();
        BakeMuttonCommand bakeMuttonCommand1 = new BakeMuttonCommand(boy);
        BakeMuttonCommand bakeMuttonCommand2 = new BakeMuttonCommand(boy);
        BakeChickenWingCommand bakeChickenWingCommand1 = new BakeChickenWingCommand(boy);
        Waiter girl = new Waiter();

        // 开店营业，顾客点菜
        girl.setOrder(bakeMuttonCommand1);
        girl.setOrder(bakeMuttonCommand2);
        girl.setOrder(bakeChickenWingCommand1);

        // 点菜完毕，通知厨房
        girl.notifyExecute();
    }
}
